import org.hibernate.Session;
import com.unydata.sistema.HibernateUtil;


public class Connecta {

	public static void main(String[] args) {
		Session sessao = null;
		
		try{
			sessao = HibernateUtil.getSession().openSession();
			System.out.println("Conectou!!");
		}catch(Exception ex){
			System.out.println("Falhou!!");
		}finally{
			sessao.close();
			System.out.println("Fechou!!");
		}
		
	}
	
}
